<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Russian Dolls for the Maximum Stable Set Problem: graph/graph.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Russian Dolls for the Maximum Stable Set Problem
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_12552d7fa429bf94a2e32e5cf39f7e69.html">graph</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">graph.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Macros and inline functions of a bitmap implementation of a graph adjacency matrix.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="bitmap_8h_source.html">bitmap.h</a>&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;malloc.h&gt;</code><br/>
</div>
<p><a href="graph_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structGraph.html">Graph</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bitmap implementation of a graph adjacency matrix.  <a href="structGraph.html#details">More...</a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ab71bc4f2f0ce94074f64128cdd4c5b68"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graph_8h.html#ab71bc4f2f0ce94074f64128cdd4c5b68">ROWINDEX</a>(g, i)&#160;&#160;&#160;((i) &lt;&lt; g-&gt;logrowsize)</td></tr>
<tr class="memdesc:ab71bc4f2f0ce94074f64128cdd4c5b68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index in the bitmap <code>g</code> of the first element in row <code>i</code>.  <a href="#ab71bc4f2f0ce94074f64128cdd4c5b68"></a><br/></td></tr>
<tr class="memitem:a02b968cb87903d74caa04a7abec8ffb2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graph_8h.html#a02b968cb87903d74caa04a7abec8ffb2">PAIRINDEX</a>(g, i, j)&#160;&#160;&#160;(<a class="el" href="graph_8h.html#ab71bc4f2f0ce94074f64128cdd4c5b68">ROWINDEX</a>(g,i)+<a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(j))</td></tr>
<tr class="memdesc:a02b968cb87903d74caa04a7abec8ffb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index in the bitmap <code>g</code> of the edge <code>i</code>, <code>j</code>.  <a href="#a02b968cb87903d74caa04a7abec8ffb2"></a><br/></td></tr>
<tr class="memitem:a7097c2b8f64f735bf5e9e0a93f54d9e9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graph_8h.html#a7097c2b8f64f735bf5e9e0a93f54d9e9">NEIG</a>(g, i)&#160;&#160;&#160;(g-&gt;matrix+<a class="el" href="graph_8h.html#ab71bc4f2f0ce94074f64128cdd4c5b68">ROWINDEX</a>(g,i))</td></tr>
<tr class="memdesc:a7097c2b8f64f735bf5e9e0a93f54d9e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bitmap corresponding to the neigborhood of <code>i</code> in <code>g</code>.  <a href="#a7097c2b8f64f735bf5e9e0a93f54d9e9"></a><br/></td></tr>
<tr class="memitem:ad60f540e053e4645ad93ab6773f83d5b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graph_8h.html#ad60f540e053e4645ad93ab6773f83d5b">HASEDGE</a>(g, i, j)&#160;&#160;&#160;<a class="el" href="bitmap_8h.html#a14fc6dc47eef5bf11c7f0cc62d5810be">ISINNODE</a>(<a class="el" href="graph_8h.html#a7097c2b8f64f735bf5e9e0a93f54d9e9">NEIG</a>(g,i)[<a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(j)],<a class="el" href="bitmap_8h.html#a38e54c56fc0272a1b9d42ba71935bb25">IDXINNODE</a>(j))</td></tr>
<tr class="memdesc:ad60f540e053e4645ad93ab6773f83d5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a non-zero value if <code>i</code>, <code>j</code> defines an edge in <code>g</code>, and 0 otherwise.  <a href="#ad60f540e053e4645ad93ab6773f83d5b"></a><br/></td></tr>
<tr class="memitem:a4a7e45e23b4bca3c2b6863ab3b298387"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graph_8h.html#a4a7e45e23b4bca3c2b6863ab3b298387">ADDEDGE</a>(g, i, j)&#160;&#160;&#160;<a class="el" href="bitmap_8h.html#a0eb72bff3ce11daf1a05821253a8c649">ADDTONODE</a>(<a class="el" href="graph_8h.html#a7097c2b8f64f735bf5e9e0a93f54d9e9">NEIG</a>(g,i)[<a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(j)],<a class="el" href="bitmap_8h.html#a38e54c56fc0272a1b9d42ba71935bb25">IDXINNODE</a>(j))</td></tr>
<tr class="memdesc:a4a7e45e23b4bca3c2b6863ab3b298387"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the node of <code>g</code> containing the edge <code>i</code>, <code>j</code>.  <a href="#a4a7e45e23b4bca3c2b6863ab3b298387"></a><br/></td></tr>
<tr class="memitem:a95e9c8b7a675bcf29d05e04965d3b168"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graph_8h.html#a95e9c8b7a675bcf29d05e04965d3b168">DELEDGE</a>(g, i, j)&#160;&#160;&#160;<a class="el" href="bitmap_8h.html#ab49b1a17c43250b876e6ff5f0afb03c3">DELFROMNODE</a>(<a class="el" href="graph_8h.html#a7097c2b8f64f735bf5e9e0a93f54d9e9">NEIG</a>(g,i)[<a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(j)],<a class="el" href="bitmap_8h.html#a38e54c56fc0272a1b9d42ba71935bb25">IDXINNODE</a>(j))</td></tr>
<tr class="memdesc:a95e9c8b7a675bcf29d05e04965d3b168"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the node of <code>g</code> with the edge <code>i</code>, <code>j</code> unset.  <a href="#a95e9c8b7a675bcf29d05e04965d3b168"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Macros and inline functions of a bitmap implementation of a graph adjacency matrix. </p>
<dl class="section date"><dt>Date:</dt><dd>Sep 24, 2013 </dd></dl>
<dl class="section author"><dt>Author:</dt><dd>Ricardo C. Corrêa (<a href="#" onclick="location.href='mai'+'lto:'+'cor'+'re'+'a@l'+'ia'+'.uf'+'c.'+'br'; return false;">corre<span style="display: none;">.nosp@m.</span>a@li<span style="display: none;">.nosp@m.</span>a.ufc<span style="display: none;">.nosp@m.</span>.br</a>) </dd></dl>
</div><hr/><h2>Macro Definition Documentation</h2>
<a class="anchor" id="a4a7e45e23b4bca3c2b6863ab3b298387"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADDEDGE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">g, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">j&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="bitmap_8h.html#a0eb72bff3ce11daf1a05821253a8c649">ADDTONODE</a>(<a class="el" href="graph_8h.html#a7097c2b8f64f735bf5e9e0a93f54d9e9">NEIG</a>(g,i)[<a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(j)],<a class="el" href="bitmap_8h.html#a38e54c56fc0272a1b9d42ba71935bb25">IDXINNODE</a>(j))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the node of <code>g</code> containing the edge <code>i</code>, <code>j</code>. </p>

</div>
</div>
<a class="anchor" id="a95e9c8b7a675bcf29d05e04965d3b168"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DELEDGE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">g, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">j&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="bitmap_8h.html#ab49b1a17c43250b876e6ff5f0afb03c3">DELFROMNODE</a>(<a class="el" href="graph_8h.html#a7097c2b8f64f735bf5e9e0a93f54d9e9">NEIG</a>(g,i)[<a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(j)],<a class="el" href="bitmap_8h.html#a38e54c56fc0272a1b9d42ba71935bb25">IDXINNODE</a>(j))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the node of <code>g</code> with the edge <code>i</code>, <code>j</code> unset. </p>

</div>
</div>
<a class="anchor" id="ad60f540e053e4645ad93ab6773f83d5b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HASEDGE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">g, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">j&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="bitmap_8h.html#a14fc6dc47eef5bf11c7f0cc62d5810be">ISINNODE</a>(<a class="el" href="graph_8h.html#a7097c2b8f64f735bf5e9e0a93f54d9e9">NEIG</a>(g,i)[<a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(j)],<a class="el" href="bitmap_8h.html#a38e54c56fc0272a1b9d42ba71935bb25">IDXINNODE</a>(j))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a non-zero value if <code>i</code>, <code>j</code> defines an edge in <code>g</code>, and 0 otherwise. </p>

</div>
</div>
<a class="anchor" id="a7097c2b8f64f735bf5e9e0a93f54d9e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NEIG</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">g, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(g-&gt;matrix+<a class="el" href="graph_8h.html#ab71bc4f2f0ce94074f64128cdd4c5b68">ROWINDEX</a>(g,i))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bitmap corresponding to the neigborhood of <code>i</code> in <code>g</code>. </p>

</div>
</div>
<a class="anchor" id="a02b968cb87903d74caa04a7abec8ffb2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PAIRINDEX</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">g, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">j&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(<a class="el" href="graph_8h.html#ab71bc4f2f0ce94074f64128cdd4c5b68">ROWINDEX</a>(g,i)+<a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(j))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Index in the bitmap <code>g</code> of the edge <code>i</code>, <code>j</code>. </p>

</div>
</div>
<a class="anchor" id="ab71bc4f2f0ce94074f64128cdd4c5b68"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ROWINDEX</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">g, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((i) &lt;&lt; g-&gt;logrowsize)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Index in the bitmap <code>g</code> of the first element in row <code>i</code>. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 14 2014 13:23:35 for Russian Dolls for the Maximum Stable Set Problem by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
